;((doc, sto, loc)=> {
 const oInput = doc.querySelector('#username');
 const oBtn = doc.querySelector('#btn');

 const init = () => {
  bindEvent()
 }

 function bindEvent() {
   oBtn.addEventListener('click', handleEnterClick, false);
 }

 function handleEnterClick() {
  const username = oInput.value;

  sto.setItem('username', username);
  loc.href = 'index.html'
 }

 init()
})(document, localStorage, location);